<template>
	  <map name="" longitude="114.037477" latitude="32.143518"></map>
	  <button @click="shoose">选择找房</button>
</template>

<script setup>
	const shoose=()=>{
		uni.chooseLocation({
			success(e) {
				let aa
				 aa=e.address.indexOf("区") 
				 if(aa==-1){
					aa= e.address.indexOf("县")
				 }
				console.log(e.address,aa)
				const address=e.address.slice(0,aa+1)
				uni.navigateTo({
					url:`/pages/seach/seach?isall=${address}`
				})
			},
			fail(e) {
				console.log(e)
			}
		})
	}
</script>

<style lang="scss" scoped>
	map{
		height: 100vh;
		width: 100vw;
	}
	button{
		position: fixed;
		width: 100%;
		bottom: 0;
	}
</style>
